﻿<!--#include file="../../Inc/Const.Asp"-->
<%

Dim Plus
Set Plus = New Cls_Plus
Plus.Open("webrpc") ' 打开配置文件
If Plus.Config("state") = 0 Then
	Response.Write Plus.Lang("state")
	Set Plus = Nothing
	Response.End
End If

Function Chkuser()
	Dim AdminName : AdminName = Getpost("adminname")
	Dim AdminPass : AdminPass = Getpost("adminpass")
	If Len(AdminName) = 0 Then Response.Write Plus.Lang("noadminname") : Response.End
	If Len(AdminPass) = 0 Then Response.Write Plus.Lang("noadminpass") : Response.End
	Dim Ns
	Set Ns = DB("Select [Password] From [{pre}Admin] Where [Username]='" & AdminName & "'",1)
	If Ns.Eof Then
		Ns.Close : Set Ns = Nothing
		Conn.Close : Set Conn = Nothing
		Response.Write Plus.Lang("adminnameerr") : Response.End
	Else
		If LCase(Ns(0)) <> LCase(MD5(AdminPass,32)) Then 
			Ns.Close : Set Ns = Nothing
			Conn.Close : Set Conn = Nothing
			Response.Write Plus.Lang("adminpasserr") : Response.End
		End If
	End IF
	Ns.Close
	Set Ns = Nothing
End Function

Function Getpost(Byval Attr)
	If Len(Attr)>0 Then Getpost = Replace(Trim(Cstr(Request(Attr))),"'", "''")
End Function
%>